package com.veeder.datacollection.main;
import java.io.IOException;

import com.veeder.datacollection.collector.ATGFetcher;
import com.veeder.datacollection.collector.ATGFetcherFactory;
import com.veeder.datacollection.exception.ConfigurationException;
import com.veeder.datacollection.rs232.response.BasicTankInventory;
import com.veeder.datacollection.rs232.response.TankResponseReport;

public class Test {
	
	public static void main(String[] args) {
		try {
			
			ATGFetcher atg=ATGFetcherFactory.getATG();
			
			TankResponseReport<BasicTankInventory>  inventory = atg.getAllTankInventories();
			
			for(int i: inventory.getAllTanks()) {
				System.out.println(inventory.getResponse(i).toString());
			}
			
			atg.closeConnectionWithATG();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ConfigurationException e) {
			e.printStackTrace();
		}
	}

}
